import time

from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Firefox()
driver.get('http://10.59.9.12:7001/')
driver.maximize_window()
time.sleep(3)
# #第一步点击登录
# driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').click()
# time.sleep(3)
# #输入用户名
# driver.find_element(By.NAME,'username').send_keys('13811033962')
# time.sleep(5)
# #输入密码
# driver.find_element(By.ID,'password').send_keys('123456')
# time.sleep(10)
# #点击登录按钮
# driver.find_element(By.XPATH,'//*[@id="theForm"]/div[5]/a')
# time.sleep(5)
# #点击电器
# driver.find_element(By.CLASS_NAME,'active').click()
# time.sleep(3)
# #点击搜索框
# driver.find_element(By.XPATH,'//input[contains(@class,"search-input")]').click()
# time.sleep(5)

ys=driver.find_element(By.XPATH,'/html/body/div[3]/div[1]/div[2]/div/div[1]/div[1]/div/a')
time.sleep(3)

print(ys.text)

print(ys.get_attribute('class'))

print(ys.size)

print(ys.location)

print(ys.is_enabled())

print(ys.is_displayed())

print(ys.is_selected())



